import  {createStore,applyMiddleware,combineReducers } from  'redux';
import reducers from '../reducers';
//import {createLogger} from 'redux-logger';
import promise from 'redux-promise';

//const logger = createLogger();
//组合新的Store （支持异步，日志）
const createStoreWithMiddleware = applyMiddleware(promise)(createStore);  

export default function configureStore(initialState) {  
  const store = createStoreWithMiddleware(reducers, initialState);  
  return store;  
}  